﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;

/// <summary>
/// Summary description for FileOperate
/// </summary>
public class FileOperate
{
    /// <summary>
    /// 从文件中读取文本内容
    /// </summary>
    /// <param name="path">文件路径</param>
    /// <returns>文件的内容</returns>
    public static string ReadFile(string path)
    {
        string content = string.Empty;
        using (StreamReader reader = new StreamReader(path))
        {
            content = reader.ReadToEnd();
        }

        return content;
    }
}